unit uCategoryManager;

{$mode objfpc}{$H+}

interface


type
    TCategoryKind = (
        ockBookmark = 0,
        ockMailBox = 1,
        ockRSSBox = 2
    );

    { TCategoryRec }

    TCategoryRec = class
    private
        FDescr: string;
        FIcon: string;
        FID: string;
        FKind: integer;
        FName: string;
        FParent: TCategoryRec;
        procedure SetDescr(AValue: string);
        procedure SetIcon(AValue: string);
        procedure SetID(AValue: string);
        procedure SetKind(AValue: integer);
        procedure SetName(AValue: string);
        procedure SetParent(AValue: TCategoryRec);
    protected
    public
        property ID: string read FID write SetID;
        property Kind: integer read FKind write SetKind;
        property Name: string read FName write SetName;
        property Descr: string read FDescr write SetDescr;
        property Icon: string read FIcon write SetIcon;
        property Parent: TCategoryRec read FParent write SetParent;
    end;

implementation

{ TCategoryRec }

procedure TCategoryRec.SetDescr(AValue: string);
begin
    if FDescr = AValue then
        Exit;
    FDescr := AValue;
end;

procedure TCategoryRec.SetIcon(AValue: string);
begin
    if FIcon = AValue then
        Exit;
    FIcon := AValue;
end;

procedure TCategoryRec.SetID(AValue: string);
begin
    if FID = AValue then
        Exit;
    FID := AValue;
end;

procedure TCategoryRec.SetKind(AValue: integer);
begin
    if FKind = AValue then
        Exit;
    FKind := AValue;
end;

procedure TCategoryRec.SetName(AValue: string);
begin
    if FName = AValue then
        Exit;
    FName := AValue;
end;

procedure TCategoryRec.SetParent(AValue: TCategoryRec);
begin
    if FParent = AValue then
        Exit;
    FParent := AValue;
end;

end.
